package inc.sneid.reminderSpring.utils;

import java.sql.Timestamp;

public class TimestampBuilder {

    private int minutes, hours, days;

    public TimestampBuilder() {
    }

    public TimestampBuilder minutes(int minutes){
        this.minutes = minutes;
        return this;
    }

    public TimestampBuilder hours(int hours){
        this.hours = hours;
        return this;
    }

    public TimestampBuilder days(int days){
        this.days = days;
        return this;
    }

    public Timestamp build(){
        long milliseconds = (minutes + 60L *hours + 24L *60*days) * 60 * 1000;
        return new Timestamp(milliseconds);
    }

}
